SAMPL plain wave algorithm